package org.hdax.dm.client;

import org.hdax.dm.entity.linkuser.LinkUser;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name = "dm-user-provider")
public interface LinkUserClient {

    @PostMapping(path = "/findByUserId")
    LinkUser findByUserId(@RequestParam("userId") Long userId);

    @PostMapping(path = "/addLinkUser")
    LinkUser addLinkUser(@RequestBody LinkUser linkUser);

    @PostMapping(path = "/findByIdCard")
    LinkUser findByIdCard(@RequestParam("idCard") String idCard);

    @PostMapping(path = "/findLinkUserById")
    LinkUser findLinkUserById(@RequestParam("id") Long id);

    @PostMapping(path = "/deleteLinkUserById")
    void deleteLinkUserById(@RequestParam("linkId") Integer linkId);
}
